package com.example.mentalhealth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.mentalhealth.entities.ExamRecordQuestion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

//考卷记录
@Mapper
public interface ExamRecordQuestionMapper extends BaseMapper<ExamRecordQuestion> {

    //通过考卷记录id查询考题记录
    List<ExamRecordQuestion> queryByExamRecordId(Long recordId);

    //查询考题记录
    List<ExamRecordQuestion> queryExamRecordQuestion();

    //通过id更新考题记录
    int updateScoreById(@Param("id") Long id, @Param("score") BigDecimal score, @Param("is_correct") Integer isCorrect);
}
